-
-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fake time #147
Add fake time #147
Conversation
Note to self. It should probably called fake time. Also, this doesn't actually work yet because the fake is selected at compile time, however, the library is not compiled with the unit test flags but only the unit test part is. Therefore, part of the time API is still using the real time. Something like dependency injection could fix this. |
In order to avoid sketchy unit test results on bursted or slow CI machines, it makes sense to provide mocked time functionality.
Since the unit test depends on the already compiled library file, we need to provide the functionality for the real and mocked time at runtime.
8967560
to
765470c
Compare
The time has still an implementation is not just an API that responds as expected, it is actually a fake and not a mock.
This brings this project more inline with the usual way that a library for Linux/Mac is built. The build is still static for Android, iOS, and Windows in order not to break too much. Also, we now link the library to curl and pthread instead of having to link that later in each executable that depends on this library.
This lead to the integration test being empty on Windows.
Somehow the dlls are not found unless you copy them to the folder where you run the exe in.
- The Windows check was wrong. - Since we swapped to dynamic, we link to .so.
Note: I have local changes and an updated docker image for this that I could not push yet. |
I'm merging this now because I need to rebase other PRs on top of it that are failing because of the flaky unit tests. |
In order to avoid sketchy unit test results on bursted or slow CI
machines, it makes sense to provide mocked time functionality.
This should fix the CI troubles introduced by #134.
Should fix #43 for good.